package com.lovo.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lovo.project.bean.BuyBean;
import com.lovo.project.mapper.BuyMapper;
import com.lovo.project.service.BuyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BuyServiceImpl extends ServiceImpl<BuyMapper, BuyBean> implements BuyService {
    @Autowired
    BuyMapper buyMapper;

    @Override
    public List<BuyBean> queryBuyList(QueryWrapper<BuyBean> queryWrapper) {
        List<BuyBean> list=buyMapper.selectList(queryWrapper);
        return list;
    }

    @Override
    public void insertBuy(BuyBean buyBean) {
        buyMapper.insert(buyBean);
    }

    @Override
    public void deleteBuy(Integer buyId) {
        buyMapper.deleteById(buyId);
    }
}
